package es.ceura.wilder.datastructures;

import java.util.HashMap;
import java.util.Map.Entry;
import java.util.Set;

/**
 *
 * @author 66785403 (Jorge Madrid Portillo)
 */
public class PostVars {

    private HashMap<String, String> vars;

    public PostVars() {
        vars = new HashMap<>();
    }

    public PostVars(HashMap<String, String> vars) {
        this.vars = vars;
    }

    public String getVar(String key) {
        return vars.get(key);
    }

    public void putVar(String key, String value) {
        vars.put(key, value);
    }

    public Set<String> getKeys() {
        return vars.keySet();
    }

    public Set<Entry<String, String>> getEntries() {
        return vars.entrySet();
    }

    @Override
    public String toString() {
        return "PostVars{" + "vars=" + vars + '}';
    }
}
